package com.isxcode.link.template.controller;

import com.isxcode.link.template.service.TemplateService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/template")
@RequiredArgsConstructor
public class TemplateController {

    private final TemplateService templateService;

    @PostMapping("/execute")
    public String execute() {

        templateService.execute();
        return "运行成功等待结果";
    }

    @PostMapping("/getLog")
    public String getLog() {

        templateService.getLog();
        return "运行成功等待结果";
    }

}
